using System.Collections;
using System.Collections.Generic;
using MyProject.Persona;
using UnityEngine;

public class RedState : BaseState
{
    
    [HideInInspector]public bool isDash;
    [HideInInspector]public bool canDash;
    public RedState(Personas persona, PlayerController player) : base(persona, player)
    {
    }

    public override void OnStart()
    {
        // _releaseSkillTime
    }

    public override void OnEnd()
    {
        throw new System.NotImplementedException();
    }

    public override Personas LogicUpdate()
    {
        // _releaseSkillTime -= Time.deltaTime;
        // if (_releaseSkillTime <= 0)
        //     canDash = true;
        return Personas.Initial;
    }
    
    private IEnumerator Dash()
    {
        // isDash = true;
        // canDash = false;
        // float dashingGravity = player.rb.gravityScale;
        // player.rb.gravityScale = 0f;
        //
        // player.rb.velocity = new Vector2(player.rb.gameObject.transform.localScale.x * Constants.dashForce, 0f);
        // // SkillManger.destroyCollArea.gameObject.SetActive(true);
        // yield return new WaitForSeconds(Constants.dashTime);
        // // destroyCollArea.gameObject.SetActive(false);
        // player.rb.gravityScale = dashingGravity;
        // isDash = false;
        // _releaseSkillTime = dashCoolDownTime;
        // // canDash = true;
        yield return null;
    }

}
